/*
 * GerenciadorMemoria.java
 *
 * Created on 23/04/2010, 12:39:50
 */

package gerenciadorDeMemoria;

import javax.swing.JScrollPane;


/**
 *
 * @author Lucas
 */
public class GerenciadorMemoria extends javax.swing.JFrame {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 
	 */
	/** Creates new form GerenciadorMemoria */
    public GerenciadorMemoria() {
        initComponents();
        setTitle("Gerenciador de Memoria");
        for (int i = 0; i < Util.NFRAMES; i++){
            String s = Integer.toString(i) + " [" + Integer.toString(i*2) + " - " + Integer.toString(i*2+2) + " k]";
            jTable2.setValueAt(s, i , 0);
        }
    }

  
    public static void setTextTable(String text, int linha, int coluna){
        jTable2.setValueAt(text, linha, coluna);
    }

    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jTable2 = new javax.swing.JTable();
        jScrollPane3 = new JScrollPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setLayout(new java.awt.BorderLayout());
        jPanel1.add(jPanel3, java.awt.BorderLayout.PAGE_START);

        jPanel1.add(jPanel4, java.awt.BorderLayout.LINE_START);

        getContentPane().add(jPanel1, java.awt.BorderLayout.LINE_START);

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Frame", "Processo", "Pagina", "Modificada", "Recente"
            }
        ));
        jTable2.setPreferredSize(new java.awt.Dimension(500, 530));
      
        jScrollPane3.setViewportView(jTable2);
        jScrollPane3.setAutoscrolls(true);
        jScrollPane3.setPreferredSize(new java.awt.Dimension(500, 530));
        jPanel2.add(jScrollPane3);

        getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);

        pack();
    }

    /**
    * @param args the command line arguments
    */
    public void run() {
          new GerenciadorMemoria().setVisible(true);
    }

    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private JScrollPane jScrollPane3;
    private static javax.swing.JTable jTable2;
    
}
